OPC Studio User's Guide and Reference
ValueResult Format Strings
In This Topic

The operation results (instances of ValueResult) can be formatted using standard or custom format strings.

ValueResult inherits from OperationResult, including its formatting capabilities, and adds some new. Only the new and/or modified capabilities are described here; please referrer to OperationResult formatting description for all the inherited capabilities.

Standard and custom format strings are supported by some overloads of the ToString method. For example, you can supply a format string to the ToString(String) and ToString(String, IFormatProvider) methods. Standard and custom format strings are also supported by the .NET Framework composite formatting feature, which is used by some Write and WriteLine methods of the Console and StreamWriter classes, the String.Format method, and the StringBuilder.AppendFormat method. The composite format feature allows you to include the string representation of multiple data items in a single string, to specify field width, and to align values in a field.

Standard ValueResult Format Strings

The following table describes the standard format strings and displays sample output produced by each format specifier.

Format specifier Name Description  
“f” Full (short) As "F" for OperationResult, with added value.  
“F” Full (long) As for OperationResult, with added value and value type.  
“g” General (short) As for OperationResult, with added value.  
“G” General (long) As for OperationResult, with added value and value type.  

Custom ValueResult Format Strings

The following table describes the custom format specifiers and displays sample output produced by some of the format specifiers.

Format specifier Name Description  
Format specifiers inherited from OperationResult, and:
V
V(format)
Value Value of the named property, optionally formatted with format.  
Vt ValueTyoe Value of the named property.